import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_state_manager/src/simple/get_view.dart';

import 'Controller/LoginController.dart';
import 'google_login.dart';

class GetViewAndGetWidgetExample extends GetView<Controller> {
  const GetViewAndGetWidgetExample({super.key});

  @override
  Widget build(BuildContext context) {
    Get.put(Controller());

    return MaterialButton(
        onPressed: () {

          Get.bottomSheet(
              Container(
                height: 150,
                color: Colors.cyan,
                child: Center(
                    child: Text(
                      'Count has reached ${controller.count}',
                      style: const TextStyle(fontSize: 28.0, color: Colors.white),
                    )),
              ));
        },
        color: Colors.blue,
        height: 45,
        shape: RoundedRectangleBorder(
          side: const BorderSide(color: Colors.black),
          borderRadius: BorderRadius.circular(4),
        ),
        child: Obx(
          () => Text(
            "count的值为:   ${controller.count}",
            style: const TextStyle(color: Colors.white),
          ),
        ));
  }
}
